<!DOCTYPE html>
<!--conf
<sample>
              <product version="4.0b1" edition="std"/>
                     <modifications>
                            <modified date="130911"/>
                     </modifications>
               </sample>
-->
<html>
<head>
	<title>Overflow autodetect</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		var myContextMenu;
		function doOnLoad() {
			var pObj = document.getElementById("contextArea");
			myContextMenu = new dhtmlXMenuObject({
				parent: "contextArea",
				icons_path: "../common/imgs/",
				context: true,
				xml: "../common/dhxmenu3.xml",
				overflow: "auto",
				visible_area: {
					x1: window.dhx4.absLeft(pObj),
					x2: window.dhx4.absLeft(pObj)+pObj.offsetWidth,
					y1: window.dhx4.absTop(pObj),
					y2: window.dhx4.absTop(pObj)+pObj.offsetHeight
				}
			});
			// or
			// myContextMenu.setOverflowHeight("auto");
		}
	</script>
</head>
<body onload="doOnLoad()">
	<div id="contextArea" style="position: relative; left: 20px; top: 20px; width: 600px; height: 400px; border: #C1C1C1 1px solid; background-color: #E7F4FF;"></div>
</body>
</html>